<template>
	<view class="p30">
		<view class="p30 shadow-default radius10 mb20" v-for="(item, index) in noticeList" :key="index">
			<view class="text-nowrap solid-bottom pb20">{{item.name}}</view>
			<view class="flex row-between col-center mt20">
				<text class="fs24 color8">{{item.create_time}}</text>
				<text class="fs24 color8" @click="toNoticeDetail(item)">查详情</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"noticeList",
		data() {
			return {
				noticeList: [],
			}
		},
		onLoad(opt) {
			this.getData()
		},
		methods: {
			toNoticeDetail (item) {
					uni.navigateTo({
						url: '/pages/home/notice/detail?id='+item.id
					})
				
			},
			getData () {
				this.$api.announce_list().then(res => {
					this.noticeList = res.data.data
				})
			},
		}
	}
</script>

<style lang="scss">
pages {
	background-color: #FFFFFF;
}
</style>
